<template>
  <div class="IndexLayout">
    <!--  头部按钮-->
    <IndexHead />
    <!--  天气-->
    <van-notice-bar left-icon="volume-o" :scrollable="false">
      <van-swipe
          vertical
          class="notice-swipe"
          :autoplay="3000"
          :show-indicators="false"
      >
        <van-swipe-item>1</van-swipe-item>
        <van-swipe-item>2</van-swipe-item>
        <van-swipe-item>3</van-swipe-item>
      </van-swipe>
    </van-notice-bar>

    <!--    下拉刷新-->
    <van-pull-refresh
        v-model="isLoading"
        success-text="刷新成功"
        @refresh="onRefresh"
    >
            <p> :{{ count }}</p>
    </van-pull-refresh>
    <!--  轮播图-->
    <Carousel/>
    <!--  下部内容-->
    <CentreNeiong />
      <!-- Loading 加载-->
    <van-loading type="spinner" size="24px">加载中...</van-loading>

  </div>
</template>

<script>

import IndexHead from "../../components/IndexHead.vue"
import Carousel from "../../components/Carousel.vue"
import CentreNeiong from "../../components/CentreNeiong.vue";

export default {
  name: "IndexLayout",
  data() {
    return {
      active: 0,
      count: 0,
      // Toast:false,
      isLoading: false,
    };
  },
  methods: {
    onRefresh() {
      setTimeout(() => {
        // Toast('刷新成功');
        this.isLoading = false;
        this.count++;
      }, 1000);
    },
  },
  components:{
    // 头部
    IndexHead,
    //轮播图
    Carousel,
//轮播图下边内容
    CentreNeiong,

  }

}
</script>

<style scoped lang="less">
*{
  padding: 0;
  margin:0;

}

.notice-swipe {
  height: 25px;
  line-height: 25px;
}

</style>